package logic

import (
	"github.com/gogf/gf/contrib/rpc/grpcx/v2"
	"grpc-common/api/user/asset"
	"grpc-common/api/user/personal"
)

var RpcCli *RpcClient

type RpcClient struct {
	PersonalClient personal.PersonalClient
	AssetClient    asset.AssetClient
}

/*
*

	var conn = grpcx.Client.MustNewGrpcClientConn("user")

	return &ControllerV1{
	   AccountClient: v1.NewAccountClient(conn),
	}
*/
func NewRpcClient() *RpcClient {
	var conn = grpcx.Client.MustNewGrpcClientConn("user")
	return &RpcClient{
		PersonalClient: personal.NewPersonalClient(conn),
		AssetClient:    asset.NewAssetClient(conn),
	}
}
